<template>
  <el-scrollbar ref="scrollbar" v-bind="$attrs">
    <slot />
  </el-scrollbar>
</template>

<script>
import { addResizeListener, removeResizeListener } from 'element-ui/src/utils/resize-event';

export default {
  name: 'Scrollbar',
  computed: {
    scrollbar() {
      return this.$refs.scrollbar;
    }
  },
  mounted() {
    // addResizeListener(this.scrollbar.$refs.wrap, this.scrollbar.update);
  },
  beforeDestroy() {
    // removeResizeListener(this.scrollbar.$refs.wrap, this.scrollbar.update);
  }
}
</script>
